package com.xsocket.study.client;

import java.io.IOException;

import org.xsocket.connection.BlockingConnection;
import org.xsocket.connection.IBlockingConnection;
import org.xsocket.connection.INonBlockingConnection;
import org.xsocket.connection.NonBlockingConnection;

import com.xsocket.study.clienthHandler.ClientHandler;

public class NonBlockClient {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		
		
		INonBlockingConnection nbc = new NonBlockingConnection("127.0.0.1", 4444, new ClientHandler());
		
		//非阻塞变成阻塞
		//IBlockingConnection bc = new BlockingConnection(nbc); 
		
		
		nbc.write("  client nonBlocking\r\n");

		nbc.close();
		//bc.close();


	}

}
